package com.woniuxy.huayoung.service.impl;

import com.woniuxy.huayoung.entity.Order;
import com.woniuxy.huayoung.mapper.OrderMapper;
import com.woniuxy.huayoung.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author dushen
 * @className: OrderServiceImpl
 * @description: TODO 类描述
 * @create 2021-07-20-14:21
 */
@Service
@Slf4j
public class OrderServiceImpl implements OrderService {

    @Resource
    private OrderMapper orderMapper;

    @Transactional
    @Override
    public void insertFlightOrder(Order order) {

        orderMapper.insertFlightOrder(order);
    }

    @Override
    public List<Order> notPay(int uid) {
        return orderMapper.notPay(uid);
    }

    @Override
    public List<Order> havePay(int uid) {
        return orderMapper.havePay(uid);
    }

    @Override
    public int pay(String orderno) {
        return orderMapper.pay(orderno);
    }

    @Override
    public Order findOrder(String orderNo) {
        return orderMapper.findOrder(orderNo);
    }

    @Override
    public List<Order> all() {
        return orderMapper.all();
    }

    @Override
    public List<Order> ticket() {
        return orderMapper.ticket();
    }

    @Override
    public List<Order> travel() {
        return orderMapper.travel();
    }

    @Override
    public void updateorder(String orderno) {
        orderMapper.updateorder(orderno);
    }
}
